#1
中文=1
en=2
.ac=3
#2
DkS=c(1:10)
Q =c("a","b","c","a","b","c","a","b","c","a")
W=factor(Q,levels = c("a","b","c"),labels = c("1",'2',"3"))
tapply(DKS, W, mean)
#3
E=seq(from=10,to=60,by=5)
E[-11]
R=rep(2,10)
R
E=seq(from=10,to=55,by=5)
Frame1=data.frame(DKS,Q,E,R)
Frame1
#4
num=sample(1:50,10,replace =T)
n=0
for(i in num)
  {if(i>10) n=n+1}
n
num
len=length(num)
for(i in 1:(len-1)){
  for (j in 1:(len-1)){
   if (num[j]<num[j+1]){
     temp=num[j]
     num[j]=num[j+1]
     num[j+1]=temp
   } 
  } 
}
num  
}